1. Field
The document relates to an image processor and an operating method thereof.
2. Description of the Related Art
An image processor generally includes a camera module for capturing an image and a display device for displaying the captured image. A charge coupled device (CCD) sensor or a complementary metal oxide silicon (CMOS) sensor may be used as the camera module, and a liquid crystal display (LCD) may be used as the display device. The camera module has been miniaturized.
Recently, such a camera module is often embedded in a portable terminal. The portable terminal with the camera module is a capable of displaying a moving picture or a still picture as well as transmitting the captured pictures to a mobile communication base station.
Recently, a camera phone was introduced and widely used. The camera phone includes a micro digital camera module to photograph a picture. Such a micro digital camera module of the potable terminal is classified into an internal camera module and an external camera module. The external camera module is separately provided from the portable terminal, and it is attached to the portable terminal. The internal camera module is integrally embedded in the potable terminal.
When a recoding function or a camcorder function is performed in such a camera phone, image data and audio data must be synchronized in time.
FIG. 1 is a diagram illustrating a portable terminal according to the related art.
Referring to FIG. 1, the portable terminal includes a MODEM chip 1 and a digital signal processor (DSP) chip 2. The MODEM chip 1 controls general operations related to call processing and a system. Also, the MODEM chip 1 controls the DSP chip 2 that senses key inputs of a user.
For example, a mobile station MODEM (MSM) of QUALCOMM may be used as the MODEM chip 1. The QUALCOMM provides a MSM2000, a MSM2300, a MSM3000 and a MSM3100 as the MSM.
The DSP chip 2 is a digital signal processor and performs operations in response to the MODEM chip 1.
In a recoding mode of the portable terminal having the MODEM chip 1 and the DSP chip 2, the portable terminal uses a timer 1A in only one of the MODEM chip 1 and the DSP chip 2. For example, the portable terminal may use a timer 1A in the MODEM chip 1, and the DSP chip 2 synchronizes with the MODEM chip 1 receiving time information from the MODEM chip 1 having the timer 1A.
The MODEM chip 1 encodes an input audio signal and the DSP chip 2 encodes a video signal captured at the camera module. While encoding the audio signal and the video signal, the MODEM chip 1 uses time information about clocks generated from the timer 1A to encode the audio data in order to synchronize between the MODEM chip 1 and the DSP chip 2. The MODEM chip 1 transfers the audio data and an audio time increment thereof to the DSP chip 2. The audio time increment is a time for reproducing corresponding audio data.
The DSP chip 2 receives the audio data and the audio time increment and stores them in a memory. The DSP chip 2 calculates a video time increment using the received audio time increment. Herein, the video time increment is a time for reproducing the video data.
The video time increment is calculated by subtracting a sum of 1st audio time increment to (n−1)th audio time increment from a total time including nth audio time increment, where n is a positive integer, (n−1)th audio time increment denotes a previous audio time increment and nth audio time increment denotes a current audio time increment. The DSP chip 2 stores the audio data, the audio time increment, the video data and the video time increment in the memory.
For example, if the audio time increment is set as 300 msec in the MODEM chip 1, the MODEM chip 1 transfers both of audio data and the audio time increment thereof to the DSP chip 2 every 300 msec of the timer 1A. The DSP chip 2 receives the audio data and the audio time increments thereof every 300 msec of the timer 1A, and calculates the video time increment using the audio time increment without regard to a video frame. The calculated video time increment and the video data are stored in the memory.
The video data, for example, is displayed as 15 frames per second (15 f/s). Since the audio time increment transferred from the MODEM chip 1 is 300 msec constantly, the video time increment is calculated based on the audio time increment and the calculated video time increment is stored.
However, the data may be abnormally transferred through a line connecting the MODEM chip 1 and the DSP chip 2. That is, the audio time increment may arrive at the DSP chip 2 comparatively faster or slower, or may inconstantly arrive at the DSP chip 2. Although the audio time increment is abnormally transferred, the video time increment is always calculated based on the transferred audio time increment. As a result, displaying of video frames may be interrupted, or the audio data and the video data may be not properly synchronized.
FIG. 2 is a flowchart of a method of synchronizing audio signal and video signal in a portable terminal according to the related art.
Referring to FIG. 2, images are captured through a camera module and the captured images are encoded in a recording mode in operation S1. In order to store the video data, the video time increment is calculated receiving the audio time increment in operation S2. The calculated video time increment and video data are stored in a memory in operation S3. Also, the audio data and the audio time increment which are transferred from the MSM chip 1 are stored.
The video time increment (T—DSP—INC) is a value of subtracting a previous time (T—MSM—PREV) from a current time (T—MSM—CUR) The current time (T—MSM—CUR) is audio time increments received until a current stage, and the previous time (T—MSM—PREV) is audio time increments received until a previous stage.
That is, the video time increment T—DSP—INC is calculated by T—MSM—CUR−T—MSM—PREV.
After calculating the video time increment, it determines whether recording of image is end or not in operation S4. If not, the operation S1 is performed again. While repeatedly performing such operations, the video time increment of video data for a predetermined recoding time is stored in a memory.
In order to synchronize (Lip sync) between the audio data and the video data, the audio time increment transferred from the MODEM chip is used as a reference, and the video time increment of the DSP chip is synchronized receiving the audio time increment.
While transferring the audio time increment from the MSM chip 1 to the DSP chip 2, the audio time increment may be abnormally transferred by unexpected delay or mass-transmission of data. If the video signal is synchronized with the audio signal in this case, an interval of the video time increment of a video signal becomes irregular. As a result, the audio data and the video data may be not properly synchronized.